# -*- coding: utf-8 -*-
# @Time     : 2021/4/11 14:31
# @Author   : pengrenjie
# @Email    : 941257162@.com
# @File     : 词频统计.py
import collections

with open('Walden.txt','r+',encoding='utf-8') as fp:


    a = fp.read().split()

    print(collections.Counter(a))
